package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品对象 ws_items
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_items")
public class Items {
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String itemName;

    /**
     * 累计销售
     */
    @Excel(name = "累计销售")
    private Long sellCounts;

    /**
     * 用途1 设备申领2 在线采购3 积分兑换
     */
    @Excel(name = "用途1 设备申领2 在线采购3 积分兑换")
    private Integer purpose;

    /**
     * 上下架状态,1:上架 2:下架
     */
    @Excel(name = "上下架状态,1:上架 2:下架")
    private Integer onOffStatus;

    /**
     * 商品照片
     */
    @Excel(name = "商品照片")
    private String imgUrl;

    /**
     * 商品价格
     */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /**
     * 积分
     */
    @Excel(name = "积分")
    private Long integral;

    /**
     *
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     *
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;


    private Integer isDelete;


    private String devType;

    private BigDecimal postMan;

    public BigDecimal getPostMan() {
        return postMan;
    }

    public void setPostMan(BigDecimal postMan) {
        this.postMan = postMan;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemName() {
        return itemName;
    }

    public void setSellCounts(Long sellCounts) {
        this.sellCounts = sellCounts;
    }

    public Long getSellCounts() {
        return sellCounts;
    }

    public void setPurpose(Integer purpose) {
        this.purpose = purpose;
    }

    public Integer getPurpose() {
        return purpose;
    }

    public void setOnOffStatus(Integer onOffStatus) {
        this.onOffStatus = onOffStatus;
    }

    public Integer getOnOffStatus() {
        return onOffStatus;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setIntegral(Long integral) {
        this.integral = integral;
    }

    public Long getIntegral() {
        return integral;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }


    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }


    public String getDevType() {
        return devType;
    }

    public void setDevType(String devType) {
        this.devType = devType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("itemName", getItemName())
                .append("sellCounts", getSellCounts())
                .append("purpose", getPurpose())
                .append("onOffStatus", getOnOffStatus())
                .append("imgUrl", getImgUrl())
                .append("price", getPrice())
                .append("integral", getIntegral())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .toString();
    }
}
